#!/bin/bash
echo "Testing AI Communication System..."
echo

WXWIN="/d/vc/wxWidgets-3.2.7"
export PATH="$WXWIN/lib:$PATH"

# 确定可执行文件路径
if [[ -f "cbp2make_ai.exe" ]]; then
    AI_CMD="./cbp2make_ai.exe"
elif [[ -f "bin/cbp2make_ai.exe" ]]; then
    AI_CMD="./bin/cbp2make_ai.exe"
else
    echo "❌ cbp2make_ai.exe not found"
    echo "Please build the system first"
    exit 1
fi

echo "✅ Found executable: $AI_CMD"
echo

# 测试各种功能
echo "1. Testing status..."
"$AI_CMD" --status
echo

echo "2. Testing file listing..."
"$AI_CMD" --files
echo

echo "3. Testing help..."
"$AI_CMD" --help
echo

echo "🎉 All tests passed!"
echo
echo "To start interactive mode:"
echo "  $AI_CMD --interactive"
echo "  or"
echo "  ./start_ai.sh --interactive"
